// pages/my/setting/index.js
const app = getApp()
Page({
  data: {
  token: ''
  },
  login() {
    wx.redirectTo({
      url: '../loging/index',
    })
  },
  logout(){
    wx.showModal({
      title: '退出登录',
      content: '确认退出登录吗？',
      success: function (res) {
        if (res.confirm) {
           wx.clearStorageSync()
          wx.reLaunch({
            url: '../loging/index'
          })
      }
      }
    })
  },
  changePass(){
    wx.navigateTo({
      url: 'changePass/index'
    })
  },
  onLoad(option){
    this.setData({
      token: wx.getStorageSync('token') || ''
    })
  }
})